package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

//采购订单
@Getter
@Setter
public class StockincomeBill {
    public static final int STATUS_QUIT=0; //未审核
    public static final int STATUS_EXIST=1; //审核

    private Long id; //采购id

    private  String sn; //采购编码

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date vdate; //业务时间


    private int state=STATUS_QUIT; //状态,默认为0
    private BigDecimal totalAmount; //总金额

    private BigDecimal totalNumber; //总数量

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date auditTime; //审核时间

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date inputTime; //录入时间

    private Employee inputUser; //录入人

    private Employee  auditor; //审核人

    private Depot depot; //入库

    //入库单和入库明细 是一对多的关系
    List<StockincomeBillItem> items = new ArrayList<>();


}
